<!DOCTYPE html>
<html class="x-admin-sm">

    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.2</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="css/font.css">
        <link rel="stylesheet" href="css/xadmin.css">
        <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <script type="text/javascript" src="lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="js/xadmin.js"></script>
        <script type="text/javascript" src="js/mtable.js"></script>
        <script type="text/javascript" src="js/setData.js"></script>
        <script type="text/javascript" src="js/sendData.js"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
            <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
            <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]--></head>

    <body>
        <div class="layui-fluid">
            <div class="layui-row">
                <form class="layui-form">
                    <div class="java_designer">
                        <div class="layui-form-item" style="color: #F08080;">java研发工程师</div>
                        <div class="layui-form-item" id="java_designer_add">
                            <label for="username" class="layui-form-label">java研发工程师人数</label>
                            <div class="layui-input-inline">
                                <input type="number" min="0" placeholder="请输入java研发工程师人数"  id="java_designer_num" name="java_designer_num" autocomplete="off" class="layui-input"></div></div>
                            <input type="number" id="java_designer_hide_num" hidden="hidden" value="0">
                        <li id="java_designer_upload"></li></div>
                    <div class="andriod_designer">
                        <div class="layui-form-item" style="color: #F08080;">安卓开发工程师</div>
                        <div class="layui-form-item" id="andriod_designer_add">
                            <label for="username" class="layui-form-label">安卓开发工程师人数</label>
                            <div class="layui-input-inline">
                                <input type="number" min="0" placeholder="请输入安卓开发工程师人数"  id="andriod_designer_num" name="andriod_designer_num" autocomplete="off" class="layui-input"></div></div>
                            <input type="number" id="andriod_designer_hide_num" hidden="hidden" value="0">
                        <li id="andriod_designer_upload"></li></div>
                    <div class="App_designer">
                        <div class="layui-form-item" style="color: #F08080;">苹果开发工程师</div>
                        <div class="layui-form-item" id="App_designer_add">
                            <label for="username" class="layui-form-label">苹果开发工程师人数</label>
                            <div class="layui-input-inline">
                                <input type="number" min="0" placeholder="请输入苹果开发工程师人数"  id="App_designer_num" name="App_designer_num" autocomplete="off" class="layui-input"></div></div>
                            <input type="number" id="App_designer_hide_num" hidden="hidden" value="0">
                        <li id="App_designer_upload"></li></div>
                    <div class="C_designer">
                        <div class="layui-form-item" style="color: #F08080;">C#开发工程师</div>
                        <div class="layui-form-item" id="C_designer_add">
                            <label for="username" class="layui-form-label">C#开发工程师人数</label>
                            <div class="layui-input-inline">
                                <input type="number" min="0" placeholder="请输入C#开发工程师人数"  id="C_designer_num" name="C_designer_num" autocomplete="off" class="layui-input"></div></div>
                            <input type="number" id="C_designer_hide_num" hidden="hidden" value="0">
                        <li id="C_designer_upload"></li></div>
                    <div class="web_designer">
                        <div class="layui-form-item" style="color: #F08080;">前端开发工程师</div>
                        <div class="layui-form-item" id="web_designer_2_add">
                            <label for="username" class="layui-form-label">前端开发工程师人数</label>
                            <div class="layui-input-inline">
                                <input type="number" min="0" placeholder="请输入前端开发工程师人数"  id="web_designer_2_num" name="web_designer_2_num" autocomplete="off" class="layui-input"></div></div>
                        <input type="number" id="web_designer_2_hide_num" hidden="hidden" value="0">
                        <li id="web_designer_2_upload"></li></div>
<!--                    <button class="layui-btn layui-btn-danger" id="button_store" style="display:block; margin-bottom:20px; width: 80px;" onclick="sendData(3)">
                            <i class="layui-icon"></i>保存</button>-->
                    <button class="layui-btn layui-btn-danger" id='button_store' value="3" style="display:block; margin-bottom:20px; width: 80px;"  lay-submit="" lay-filter="sendData">
                        <i class="layui-icon"></i>保存</button>
                </form>
            </div>
        </div>
        <script>
            var a=GetRequest();
            var tableId=a['tableId'];
            var xtkfJavayfgcs=a['xtkfJavayfgcs'];
            var xtkfAzkfgcs=a['xtkfAzkfgcs'];
            var xtkfPgkfgcs=a['xtkfPgkfgcs'];
            var xtkfCkfgcs=a['xtkfCkfgcs'];
            var xtkfQdkfgcs=a['xtkfQdkfgcs'];
            if(xtkfJavayfgcs == 1)   javaDesignerMode();
                else $('.java_designer').hide();
            if(xtkfAzkfgcs == 1)  andriodDesignerMode();
                else $('.andriod_designer').hide();
            if(xtkfPgkfgcs == 1)   AppDesignerMode();
                else $('.App_designer').hide();
            if(xtkfCkfgcs == 1)  CDesignerMode();
                else $('.C_designer').hide();
            if(xtkfQdkfgcs == 1)   webDesigner_2Mode();
                else $('.web_designer').hide();
            var status=a['status'];
            if(tableId){
                $(window).load( function(){
                    initData(tableId,3);
                    setTimeout(
                        function(){
                            var evtObj = document.createEvent('UIEvents');
                            evtObj.initUIEvent('input', true, true, window, 1 );
                            document.querySelector("#java_designer_num").dispatchEvent(evtObj);
                            document.querySelector("#App_designer_num").dispatchEvent(evtObj);
                            document.querySelector("#andriod_designer_num").dispatchEvent(evtObj);
                            document.querySelector("#C_designer_num").dispatchEvent(evtObj);
                            document.querySelector("#web_designer_2_num").dispatchEvent(evtObj);
                            if(status==1) {
                                $('#button_store').hide();
                                $('#java_designer_num').attr("disabled","disabled");
                                $('#App_designer_num').attr("disabled","disabled");
                                $('#andriod_designer_num').attr("disabled","disabled");
                                $('#C_designer_num').attr("disabled","disabled");
                                $('#web_designer_2_num').attr("disabled","disabled");
                                $('#ui_designer_num').attr("disabled","disabled");
                                var javaDesignerNum = $('#java_designer_num').val();
                                $('#java_designer_money').attr("disabled","disabled");
                                for (let i =1;i<=javaDesignerNum;++i) {
                                    $('#java_designer_name_'+i).attr("disabled","disabled");
                                    $('#java_designer_num_'+i).attr("disabled","disabled");
                                    $('#java_designer_totalnum_'+i).attr("disabled","disabled");
                                }
                                var appDesignerNum = $('#App_designer_num').val();
                                $('#App_designer_money').attr("disabled","disabled");
                                for (let i =1;i<=appDesignerNum;++i) {
                                    $('#App_designer_name_'+i).attr("disabled","disabled");
                                    $('#App_designer_num_'+i).attr("disabled","disabled");
                                    $('#App_designer_totalnum_'+i).attr("disabled","disabled");
                                }
                                var andriodDesignerNum = $('#andriod_designer_num').val();
                                $('#andriod_designer_money').attr("disabled","disabled");
                                for (let i =1;i<=andriodDesignerNum;++i) {
                                    $('#andriod_designer_name_'+i).attr("disabled","disabled");
                                    $('#andriod_designer_num_'+i).attr("disabled","disabled");
                                    $('#andriod_designer_totalnum_'+i).attr("disabled","disabled");
                                }
                                var CDesignerNum = $('#C_designer_num').val();
                                $('#C_designer_money').attr("disabled","disabled");
                                for (let i =1;i<=CDesignerNum;++i) {
                                    $('#C_designer_name_'+i).attr("disabled","disabled");
                                    $('#C_designer_num_'+i).attr("disabled","disabled");
                                    $('#C_designer_totalnum_'+i).attr("disabled","disabled");
                                }
                                var webDesignerNum = $('#web_designer_2_num').val();
                                $('#web_designer_2_money').attr("disabled","disabled");
                                for (let i =1;i<=webDesignerNum;++i) {
                                    $('#web_designer_2_name_'+i).attr("disabled","disabled");
                                    $('#web_designer_2_num_'+i).attr("disabled","disabled");
                                    $('#web_designer_2_totalnum_'+i).attr("disabled","disabled");
                        }}},10)
                });
            };
        </script>
    </body>

</html>